.class public Lcom/bitauto/autoeasy/db/DBOpenHelper;
.super Landroid/database/sqlite/SQLiteOpenHelper;
.source "DBOpenHelper.java"


# static fields
.field public static final BBSCOUNTS:Ljava/lang/String; = "bbscounts"

.field public static final BBSNAME:Ljava/lang/String; = "bbsname"

.field public static final BBSTOPICS:Ljava/lang/String; = "bbstopics"

.field private static final CARID:Ljava/lang/String; = "carid"

.field private static final CARNAME:Ljava/lang/String; = "carname"

.field private static final CAR_ID:Ljava/lang/String; = "car_id"

.field private static final CAR_NAME:Ljava/lang/String; = "car_name"

.field private static final DB_NAME:Ljava/lang/String; = "autoeasy"

.field private static final DEALER_ADD:Ljava/lang/String; = "dealer_add"

.field private static final DEALER_ID:Ljava/lang/String; = "dealer_id"

.field private static final DEALER_MODE:Ljava/lang/String; = "dealer_mode"

.field private static final DEALER_NAME:Ljava/lang/String; = "dealer_name"

.field private static final DEALER_PHONE:Ljava/lang/String; = "dealer_phone"

.field private static final DEALER_PRICE:Ljava/lang/String; = "dealer_price"

.field private static final FAV_BBS:Ljava/lang/String; = "fav_bbs"

.field private static final FAV_CAR:Ljava/lang/String; = "fav_car"

.field private static final FAV_DEA:Ljava/lang/String; = "fav_dealer"

.field public static final ID:Ljava/lang/String; = "id"

.field private static final IMAGEPATH:Ljava/lang/String; = "imagepath"

.field private static final RANG:Ljava/lang/String; = "rang"

.field private static final VERSION:I = 0x1


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 3
    .parameter "context"

    .prologue
    .line 36
    const-string v0, "autoeasy"

    const/4 v1, 0x0

    const/4 v2, 0x1

    invoke-direct {p0, p1, v0, v1, v2}, Landroid/database/sqlite/SQLiteOpenHelper;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/database/sqlite/SQLiteDatabase$CursorFactory;I)V

    .line 37
    return-void
.end method


# virtual methods
.method public onCreate(Landroid/database/sqlite/SQLiteDatabase;)V
    .locals 1
    .parameter "db"

    .prologue
    .line 41
    const-string v0, "create table fav_car(carid integer primary key ,carname varchar,rang varchar,imagepath varchar )"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 44
    const-string v0, "create table fav_dealer(dealer_id integer primary key ,dealer_add varchar,dealer_mode varchar,dealer_phone varchar,dealer_price varchar,car_name varchar,car_id varchar,dealer_name varchar )"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 48
    const-string v0, "create table fav_bbs(id integer primary key ,bbsname varchar,bbstopics varchar,bbscounts varchar )"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 51
    return-void
.end method

.method public onUpgrade(Landroid/database/sqlite/SQLiteDatabase;II)V
    .locals 1
    .parameter "db"
    .parameter "oldVersion"
    .parameter "newVersion"

    .prologue
    .line 55
    const-string v0, "drop table if exists fav_car"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 56
    const-string v0, "drop table if exists fav_dealer"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 57
    const-string v0, "drop table if exists fav_bbs"

    invoke-virtual {p1, v0}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;)V

    .line 58
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/db/DBOpenHelper;->onCreate(Landroid/database/sqlite/SQLiteDatabase;)V

    .line 59
    return-void
.end method
